package com.thinkgem.jeesite.modules.sys.dao;

import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.sys.entity.TbCategory;
import com.thinkgem.jeesite.modules.sys.entity.TbProduct;
import com.thinkgem.jeesite.modules.sys.entity.TbProductExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@MyBatisDao
public interface TbProductMapper {
    int countByExample(TbProductExample example);

    int deleteByExample(TbProductExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TbProduct record);

    int insertSelective(TbProduct record);


    List<TbProduct> selectByExample(TbProductExample example);

    List<TbProduct>  selectByPrimaryKey(Integer id);


    TbProduct selectProductBybarcode(TbProduct tbProduct);

    TbProduct selectByProId(Integer id);

    int updateByExampleSelective(@Param("record") TbProduct record, @Param("example") TbProductExample example);

    int updateByExample(@Param("record") TbProduct record, @Param("example") TbProductExample example);

    int updateByPrimaryKeySelective(TbProduct record);

    int updateByPrimaryKey(TbProduct record);

    List findByPage(TbProduct tbProduct);

    List findByProPage(TbProduct tbProduct);

    public List<TbCategory> getCategory(String categoryName);

    public TbProduct selecProductByBarcod(String barcode);

}